package com.yj.ccs.abs.common.enums;

/**
 * Copyright 2018 (C) Yunjian-VC
 * Created on : 2018/3/23
 * Author     : Unbelievable9
 **/
public enum FundRestreamSourceType {

    /**
     * 1 - 债务人回款
     * 2 - 债权人赎回
     * 3 - 债权人回购
     */
    DEBTOR(1),
    CREDITOR_REDEEM(2),
    CREDITOR_BUY_BACK(3);

    private Integer value;

    FundRestreamSourceType(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public static FundRestreamSourceType fromValue(Integer value) {
        for (FundRestreamSourceType fundRestreamSourceType : FundRestreamSourceType.values()) {
            if (fundRestreamSourceType.getValue().equals(value)) {
                return fundRestreamSourceType;
            }
        }

        return null;
    }
}
